package com.lz.comm.viewmodel

import androidx.room.RoomDatabase
import com.lz.library.base.BaseViewModel

/**
 *  author: you : 2020/04/31
 */
open class DataViewModel(model: DataModel = DataModel()) : BaseViewModel<DataModel>(model) {

    protected inline fun <reified T> getService(): T = model!!.getService(T::class.java)

    protected inline fun <reified T : RoomDatabase> getRoomDatabase(dbName: String): T =
        model!!.getRoomDatabase(T::class.java, dbName)
}